package com.css.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 订单状态
 */
@Getter
@AllArgsConstructor
public enum OrderStatusEnum {

    WAIT(0, "等待支付"),

	ZFCG(1, "支付成功"),

    TK(2, "退款"),
    ;
    private final Integer dm;

    private final String ms;

    public static String getMc(String dm) {
        OrderStatusEnum res = Arrays.stream(values())
                .filter(x -> x.getDm().equals(dm))
                .findFirst().orElse(null);
        return res == null ? null : res.getMs();
    }
}
